﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Runtime.Serialization;
using Celeriq.Common;

namespace Celeriq.Client.Interfaces
{
    [ServiceContract]
    public interface IRepositoryService
    {
        [OperationContract]
        int StartUp(ServiceStartup startup);

        [OperationContract]
        void ShutDown();

        [OperationContract]
        void Reset(ServiceStartup startup);

        [OperationContract]
        Guid GetID();

        [OperationContract]
        bool Backup(ServiceStartup startup, UserCredentials credentials, string backupFile);

        [OperationContract]
        bool ExportSchema(ServiceStartup startup, UserCredentials credentials, string backupFile);

        [OperationContract]
        bool Restore(ServiceStartup startup, UserCredentials credentials, string backupFile);

        [OperationContract]
        long GetDataDiskSize(UserCredentials credentials);

        [OperationContract]
        long GetDataMemorySize(UserCredentials credentials);

        [OperationContract]
        long GetItemCount(UserCredentials credentials);

        [OperationContract]
        void Compress(UserCredentials credentials);

        [OperationContract]
        void UnloadData();

        [OperationContract]
        void LoadData(UserCredentials credentials);

        [DataMember]
        DateTime LastAccess { get; }

        [DataMember]
        bool IsLoaded { get; }

        [OperationContract]
        ProfileItem[] GetProfile(UserCredentials credentials, long lastProfileId);

    }
}